﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MN.Framework.Common
{
    public enum NumericType
    {
        Integer,
        FloatingPoint
    }

    [Serializable]
    public class NumericColumnInfo : ColumnInfo
    {
        public NumericType NumericType { get; set; }
        #region Constractor
        public NumericColumnInfo(string name, string headerText)
            : base(ColumnType.Numeric, typeof(int), name, headerText)
        {
        }
        public NumericColumnInfo(string name, string headerText, bool readOnly)
            : base(ColumnType.Numeric, typeof(int), name, headerText, true, readOnly)
        {

        }

        public NumericColumnInfo(string name, string defaultText, NumericType numerciType, Type baseType, ColumnSize Size = ColumnSize.Standard)
            : this(name, defaultText)
        {
            this.BaseType = baseType;
            this.NumericType = numerciType;
            //this.formatString = formatString;
            this.Size = Size;
        }
        public NumericColumnInfo(string name, string defaultText, NumericType numerciType, Type baseType, ColumnSize Size, bool readOnly)
            : this(name, defaultText, numerciType, baseType, Size)
        {
            ReadOnly = readOnly;
        }
        public NumericColumnInfo(string name, string defaultText, NumericType numerciType, Type baseType, bool readOnly)
            : this(name, defaultText, numerciType, baseType, ColumnSize.Standard)
        {
            ReadOnly = readOnly;
        }

        #endregion
    }
}
